<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>MyIsern - Select Collaboration</title>
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="cache-control" content="no-cache">
  </head>
<body>
MyIsern 2.0
  <table border="0" id="ReportTable">
  <tr valign="center">
    <td width="10"></td>
    <td align="center">
       <stripes:link href="/index.jsp">
         Home
       </stripes:link>
    </td>
    <td width="10"></td>
    <td align="center">
       <stripes:link href="/selectResearcher.jsp" id="SelectResearcherLink">
         Researchers
       </stripes:link>
    </td>
    <td width="10"></td>
    <td align="center">
       <stripes:link href="/selectOrganization.jsp" id="SelectOrganizationLink">
         Organizations
       </stripes:link>
    </td>
    <td width="10"></td>
    <td align="center">
      <stripes:link href="/selectCollaboration.jsp" id="SelectCollaborationLink">
        Collaborations
      </stripes:link>
    </td>
    <td width="10"></td>
    <td align="center">
       <stripes:link href="/reportDataIntegrity.jsp" id="ReportDataIntegrityLink">
         Data Semantic Check
       </stripes:link>
    </td>
  </tr>  
</table>
  
<hr align="left" width="900">
List of Data Integrity Issues:
  
  <table border="1" id = "DataIntegrityTable">
    <tr>
      <th>Issue</th>
      <th>Actions</th>
    </tr>
  
    <jsp:useBean id="reporter" scope="page" class="edu.hawaii.myisern.action.ReportActionBean"/>

    <c:forEach items="${reporter.researcherCheck}" var="row">
     <tr height>
      <td width = 500>
        Researcher 
        <stripes:link href="EditResearcher.action" event="preEdit" id="${row[1]}">
          ${row[1]} 
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
        has a field named ${row[0]} with a link to 
        <stripes:link href="EditOrganization.action" event="preEdit" id="${row[1]}">
          ${row[2]} 
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
        that is invalid. 
      </td>
      <td>
        <stripes:link href="EditResearcher.action" event="preEdit" id="${row[1]}">
          Edit
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
         ${row[1]}
        <br/>
        <stripes:link href="EditResearcher.action" event="delete" id="${row[1]}">
          Delete
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link> 
        ${row[1]}
        <br/>
        <stripes:link href="EditOrganization.action" event="preEdit" id="${row[2]}">
          Edit
          <stripes:param name="name" value="${row[2]}"/>
        </stripes:link>
         ${row[2]}
        <br/>
      </td>
    </c:forEach>

    <c:forEach items="${reporter.organizationCheck}" var="row">
     <tr height>
      <td width = 500>
        Organization 
        <stripes:link href="EditOrganization.action" event="preEdit" id="${row[1]}">
          ${row[1]} 
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
        has a field named ${row[0]} with a link to 
        <stripes:link href="EditResearcher.action" event="preEdit" id="${row[1]}">
          ${row[2]} 
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
        that is invalid. 
      </td>
      <td>
        <stripes:link href="EditOrganization.action" event="preEdit" id="${row[1]}">
          Edit
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
         ${row[1]}
        <br/>
        <stripes:link href="EditOrganization.action" event="delete" id="${row[1]}">
          Delete
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link> 
        ${row[1]}
        <br/>
        <stripes:link href="EditResearcher.action" event="preEdit" id="${row[2]}">
          Edit
          <stripes:param name="name" value="${row[2]}"/>
        </stripes:link>
         ${row[2]}
        <br/>
      </td>
    </c:forEach>

    <c:forEach items="${reporter.collaborationCheck}" var="row">
     <tr height>
      <td width = 500>
        Collaboration 
        <stripes:link href="EditCollaboration.action" event="preEdit" id="${row[1]}">
          ${row[1]} 
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
        has a field named ${row[0]} with a link to 
        <stripes:link href="EditOrganization.action" event="preEdit" id="${row[1]}">
          ${row[2]} 
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
        that is invalid. 
      </td>
      <td>
        <stripes:link href="EditCollaboration.action" event="preEdit" id="${row[1]}">
          Edit
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link>
         ${row[1]}
        <br/>
        <stripes:link href="EditCollaboration.action" event="delete" id="${row[1]}">
          Delete
          <stripes:param name="name" value="${row[1]}"/>
        </stripes:link> 
        ${row[1]}
        <br/>
        <stripes:link href="EditOrganization.action" event="preEdit" id="${row[2]}">
          Edit
          <stripes:param name="name" value="${row[2]}"/>
        </stripes:link>
         ${row[2]}
        <br/>
      </td>
    </c:forEach>
</table>
 
</body>
</html>






